#{extends 'nui.html' /}
#{set title:'新用户注册' /}

#{set 'moreStyles'}
<link rel="stylesheet" media="screen" href="@{'/public/stylesheets/regist.css'}" />
#{/set}
<div id="centerBox">
	<div class="formBlock floatLeft">
		<div id="formTitle" class="f16">感谢您注册微赚</div>
		<div id="formSection">
			<!-- 已注册用户验证邮箱激活账号 -->
			#{if email}
				#{authenticityToken /}
			<div id="registResult" class="floatLeft mt30 mb30" style="margin-left:80px;">
				<div class="panelLine sec clearfix">
					<span class="ls floatLeft bold">
						验证邮件已发送到你的邮箱：&nbsp;&nbsp;
						<span class="email">${email}</span>
					</span>
				</div>
				<div class="panelLine sec clearfix">点击邮件里的确认链接完成验证流程以激活你的账号</div>

				<div class="buttonSection" style="margin-top:20px;">
					<a href="http://mail.${email?.split('@')[1]}" target="_blank" class="stdColorButton" id="btnViewMail">
						查看邮箱&nbsp;
						<span class="iconfont">&#xf016d;</span>
					</a>
				</div>
				<div class="panelLine mb10 pt10 mt20 clearfix" style="border-top:solid 1px #DEDEDE;">没有收到验证邮件？</div>
				<div class="grey">
					<ul>
						<li>1. 到广告邮件、垃圾邮件目录里找找看</li>
						<li>2. 真没收到？<a href="#" data="${email}" id="btnResend" class="orange">重新发送验证邮件</a></li>
						<li>3. 不小心填错了Email？<a href="/regist" class="orange">再申请一个</a></li>
					</ul>
				</div>
			</div>
			#{/if}
			#{else}
			<!-- 新用户注册 -->
			<form id="registForm" method="post" action="/admin/doRegister" class="">
				<input type="hidden" name="user.inviteUserId" value="${inviteUserId}" />
				#{authenticityToken /}
				<div class="panelLine sec clearfix">
					<span class="ls floatLeft lbl">
						用户名
						<span class="requiredStar">*</span>
					</span>
					<input type="text" name="user.nick" class="inputText floatLeft ls long required" id="nick" />

				</div>
				<div class="panelLine sec clearfix">
					<span class="ls floatLeft lbl">
						密码
						<span class="requiredStar">*</span>
					</span>
					<input type="password" name="user.password" class="inputText floatLeft ls long required" value="123456" id="password" />

				</div>
				<div class="panelLine sec clearfix">
					<span class="ls floatLeft lbl">
						确认密码
						<span class="requiredStar">*</span>
					</span>
					<input type="password" class="inputText floatLeft ls long required" id="txtPassword2" value="123456" name="pass2" />

				</div>
				<div class="panelLine sec clearfix">
					<span class="ls floatLeft lbl">
						邮箱
						<span class="requiredStar">*</span>
					</span>
					<input type="text" name="user.email" class="inputText floatLeft ls long required"  value="123456789@qq.com" id="email" />

				</div>
				<div class="panelLine sec clearfix">
					<span class="ls floatLeft lbl">
						QQ
						<span class="requiredStar">*</span>
					</span>
					<input type="text" name="user.qq" class="inputText floatLeft ls long required" value="123456789" id="qq" />

				</div>
				<div class="panelLine sec clearfix">
					<span class="ls floatLeft lbl">
						手机
						<span class="requiredStar">*</span>
					</span>
					<input type="text" name="user.mobile" class="inputText floatLeft ls long required" value="18510178535" id="mobile" />

				</div>
				#{if false}
				<!-- 
				<div class="panelLine sec clearfix">
					<span class="ls floatLeft lbl">
						短信验证码
						<span class="requiredStar">*</span>
					</span>
					<input type="text" name="smsValidCode" class="inputText floatLeft ls harflong" id="smsValidCode" />
					<input type="button" class="captcha" id="btncaptcha" value="获取短信验证码" />
				</div>
				 -->
				#{/if}
				<div class="panelLine sec clearfix">
					<span class="ls floatLeft lbl">
						角色
						<span class="requiredStar">*</span>
					</span>
					<input type="radio" name="user.type" value="BUYER" class="floatLeft rad mr-4 role"  checked="checked" />
					<span class="floatLeft mr-8">买手</span>
					<input type="radio" name="user.type" value="SELLER" class="floatLeft rad mr-4 role" />
					<span class="floatLeft mr-4">商家</span>
				</div>

				<div class="buttonSection" style="margin-top:35px;">
					<a href="#" class="stdColorButton" id="btnRegist">
						立即注册&nbsp;&nbsp;
						<span class="iconfont">&#xf016d;</span>
					</a>

					<span style="padding-left:20px">
						<input type="checkbox" id="radAgree" name="radAgree" checked="checked" />
						&nbsp;我已看过并同意&nbsp;
						<a class="blue" href="/doc/protocol" target="_blank">微赚服务协议</a>
					</span>
				</div>
			</form>
			#{/else}
		</div>

	</div>

	<div class="clearFix"></div>
</div>
#{set 'moreScripts'}
<script src="@{'/public/javascripts/admin/regist.js'}" type="text/javascript"></script>
<script type="text/javascript">App.module = 'adminRegister';</script>
#{/set}